#include <stdio.h>

int FindElementByIndex(char *s1,int target)
{
    for(int i = 0; i < sizeof(s1); i++)
    {
        if(s1[i] == target)
        return i;
    }
    return -1;
}

int main()
{
    char s1[] = "abcdef";
    printf("%d\n",FindElementByIndex(s1,'e'));

    return 0;
}